/* Copyright 2009
 *
 * This program and the accompanying materials
 * are made available under the terms of the
 * Eclipse Public License v1.0 which accompanies
 * this distribution, and is available at
 *
 * 		http://www.eclipse.org/legal/epl-v10.html
 *
 * Unless required by applicable law or agreed to in
 * writing, software distributed under the License is
 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
 * OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing
 * permissions and limitations under the License.
 *
 * Contributors:
 * 	   IBM Corporation - initial API and implementation for JDT/DLTK
 *     Sean W. Quinn - initial adoption for use with PHP from various sources.
 */
package org.eclipse.php.core;

import org.eclipse.dltk.core.ISourceRange;
import org.eclipse.dltk.core.ISourceReference;
import org.eclipse.php.internal.core.ast.util.Signature;

/**
 * Represents a local variable declared in a method or an initializer.
 * <code>ILocalVariable</code> are pseudo-elements created as the result of a
 * <code>ICodeAssist.codeSelect(...)</code> operation. They are not part of the
 * Java model (<code>exists()</code> returns whether the parent exists rather
 * than whether the local variable exists in the parent) and they are not
 * included in the children of an <code>IMethod</code> or an
 * <code>IInitializer</code>.
 * <p>
 * In particular such a pseudo-element should not be used as a handle. For
 * example its name range won't be updated if the underlying source changes.
 * </p>
 * 
 * @since 3.0
 * @noimplement This interface is not intended to be implemented by clients.
 */
public interface ILocalVariable extends IPHPElement, ISourceReference {

	/**
	 * Returns the name of this local variable.
	 * 
	 * @return the name of this local variable.
	 */
	String getElementName();

	/**
	 * Returns the source range of this local variable's name.
	 * 
	 * @return the source range of this local variable's name
	 */
	ISourceRange getNameRange();

	/**
	 * Returns the type signature of this local variable.
	 * <p>
	 * The type signature may be either unresolved (for source types) or
	 * resolved (for binary types), and either basic (for basic types) or rich
	 * (for parameterized types). See {@link Signature} for details.
	 * </p>
	 * 
	 * @return the type signature of this local variable.
	 * @see Signature
	 */
	String getTypeSignature();
}
